package com.example.auto.config;

import com.api.signature.auto.interceptor.AnnotationInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Jerry
 * @date 2024-01-24 11:55
 * 配置拦截器信息
 */
@Configuration
public class ResourcesConfig implements WebMvcConfigurer {

    @Autowired
    private AnnotationInterceptor annotationInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(annotationInterceptor).addPathPatterns("/**");
    }
}
